﻿<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true"
    CodeFile="ImportStock.aspx.cs" Inherits="ImportStock" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript" type="text/javascript">
// <!CDATA[


// ]]>
</script>

    <div class="title">
        <span class="pageTitle">ورود کالا به انبار</span>
    </div>
    
    <div><hr id="HR1" onclick="return HR1_onclick()" />
        <table width="100%">
            <tr>
                <td colspan="3" align="center">
        <table width="100%">
            <tr>
                <td style="height: 26px">
                    <asp:Label ID="Label1" runat="server" Text="نام کالا"></asp:Label></td>
                <td style="height: 26px">
                    <asp:TextBox ID="txtName" runat="server" MaxLength="50"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                        ErrorMessage="*" ValidationGroup="SaveStock"></asp:RequiredFieldValidator></td>
                <td style="height: 26px">
                    <asp:Label ID="Label4" runat="server" Text="تعداد"></asp:Label></td>
                <td style="height: 26px">
                    <asp:TextBox ID="txtQuantity" runat="server" Width="185px" MaxLength="4"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtQuantity"
                        ErrorMessage="*" ValidationGroup="SaveStock"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="Label3" runat="server" Text="شماره سریال"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtSerial" runat="server"></asp:TextBox></td>
                <td>
                    <asp:Label ID="Label5" runat="server" Text="نقطه سفارش"></asp:Label></td>
                <td>
                    <asp:TextBox ID="txtOrderPoint" runat="server" Width="184px" MaxLength="3"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtOrderPoint"
                        ErrorMessage="*" ValidationGroup="SaveStock"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td style="height: 26px">
                    <asp:Label ID="Label2" runat="server" Text="شماره سطل"></asp:Label></td>
                <td style="height: 26px">
                    <asp:TextBox ID="txtBinNumber" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtBinNumber"
                        ErrorMessage="*" ValidationGroup="SaveStock"></asp:RequiredFieldValidator></td>
                <td style="height: 26px">
                    <asp:Label ID="Label6" runat="server" Text="وضعیت"></asp:Label></td>
                <td style="height: 26px">
                    <asp:DropDownList ID="ddlStatus" runat="server" Width="191px">
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td style="height: 26px">
                    <asp:Label ID="Label7" runat="server" Text="توضیحات"></asp:Label></td>
                <td style="height: 26px">
                    <asp:TextBox ID="txtDesc" runat="server" MaxLength="100"></asp:TextBox></td>
                <td style="height: 26px">
                    </td>
                <td style="height: 26px">
                    <asp:Button ID="btnSave" runat="server" Text="ذخیره تغییرات" OnClick="btnSave_Click" ValidationGroup="SaveStock" /></td>
            </tr>
        </table>
                    <asp:Label ID="lblSaveMsg" runat="server" Text="اطلاعات با موفقیت ذخیره شد"></asp:Label></td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:GridView ID="grdStock" runat="server" AutoGenerateColumns="False">
                        <Columns>
                            <asp:BoundField DataField="StockName" HeaderText="نام کالا" />
                            <asp:BoundField DataField="BinNumber" HeaderText="شماره سطل" />
                            <asp:BoundField DataField="Serial" HeaderText="سریال" />
                            <asp:BoundField DataField="Quantity" HeaderText="تعداد" />
                            <asp:BoundField DataField="OrderPoint" HeaderText="نقطه سفارش" />
                            <asp:TemplateField HeaderText="تاریخ ایجاد">
                                <ItemTemplate>
                                    <%# Mani.Common.MyPersianDate.DateTimeToPersian(Eval("ImportDate")) %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Description" HeaderText="توضیحات" />
                        </Columns>
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
    </div>
    
    <div>
        &nbsp;</div>
</asp:Content>
